<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>客户端下载</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body{
            font-family: "Microsoft YaHei";
        }
        ul {
            list-style: none;
        }

        .wrap {
            width: 100vw;
            height: 100vh;

            display: flex;
            justify-content: center;
            overflow: auto;
            flex-direction: column;
            align-items: center;
            background-image: url(./bg.png);
            background-size: cover;
        }

        .content {
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .img_ul {
            display: flex;
        }

        .title {
            color: #333333;
            font-size: 2vw;
            margin-bottom: 14px;
        }

        .text_blue {
            color: #4B81FB;
            margin-bottom: 40px;
        }

        .img_da {
            width: 14vw;
            margin-bottom: 20px;
            transition: all 0.5s;
        }

        .img_da:hover {
            transform: scale(1.05);
        }

        .img_ul li {
            padding: 20px;
            padding-bottom: 0px;
            transition: all 0.5s;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            font-size: 12px;
        }

        .img_ul li>img {
            transition: all 0.5s;
        }

        .img_ul li>img:hover {
            transform: scale(1.05);
        }

        .img_ul li img {
            width: 6vw;
        }

        .logo {
            position: fixed;
            top: 40px;
            left: 40px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .logo img {
            width: 24px;
            margin-right: 6px;
        }

        .app_li:hover .app_url_content {
            /* display: flex;
            padding: 20px;
            background-color: #fff;
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%); */



        }

        .app_url_content {
            display: none;

        }

        .app_url_content div {
            font-size: 12px;
            text-align: center;


        }

        .app_url_content div:first-child {
            margin-right: 20px;
        }

        .app_url_content:before {
            content: '';
            width: 0px;
            height: 0px;
            /* background: pink; */
            border: 10px solid;
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-color: rgb(255, 255, 255) transparent transparent;
        }

        .window_li {
            position: relative;
            cursor: pointer;
            text-align: center;
        }

        .window_li .window {
            display: block;
        }

        .window_li .download {
            display: none;
        }

        .window_li:hover .window {
            display: none;
        }

        .window_li:hover .window_url_content {
            display: block;
        }

        .window_li:hover .download {
            display: block;
        }

        .window_li .window_url_content {
            display: none;
            position: absolute;
            top: 100%;
            left: 50%;
            color: #4B81FB;
            transform: translateX(-50%);
            cursor: pointer;
        }


        .tv_li {
            position: relative;
            cursor: pointer;
            text-align: center;
        }

        .tv_li .tv {
            display: block;
        }

        .tv_li .download {
            display: none;
        }

        .tv_li:hover .tv {
            /* display: none; */
        }

        .tv_li:hover .tv_url_content {
            /* display: block; */
        }

        .tv_li:hover .download {
            /* display: block; */
        }

        .tv_li .tv_url_content {
            display: none;
            position: absolute;
            top: 100%;
            left: 50%;
            color: #4B81FB;
            transform: translateX(-50%);
            cursor: pointer;
        }

        .mac_li:hover .mac_url_content {
          
            padding: 20px;
            background-color: #fff;
            position: absolute;
            bottom: 100%;
            left: 50%;
            transform: translateX(-50%);
            display: block;



        }

        .mac_url_content {


            display: none;

        }

        .mac_url_content div {
            font-size: 12px;
            text-align: center;
            width: 250px;
            height: 58px;
            line-height: 58px;
            background: #ECF0FA;
            border-radius: 4px;

        }

        .mac_url_content div:hover {
            background: #d5dff7;
        }

        .mac_url_content div:first-child {
            margin-bottom: 20px;
        }

        .mac_url_content:before {
            content: '';
            width: 0px;
            height: 0px;
            /* background: pink; */
            border: 10px solid;
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-color: rgb(255, 255, 255) transparent transparent;
        }
    </style>
</head>

<body>
    <div class="wrap">
        <div class="logo">
            <img src="./xiao.png" alt="">
            下载终端云NAS客户端
        </div>
        <div class="content">
            <p class="title">下载终端云NAS客户端</p>
            <p class="text_blue">多端信息同步，不同设备，随时随地使用</p>
            <img class="img_da" src="./da.png" alt="">
            <ul class="img_ul">
                <!-- <li class="app_li">
                    <img src="./app.png" alt="">
                    APP
                    <div class="app_url_content">
                        <div>
                            <img src="./erweima.png" alt="">
                            Android
                        </div>
                        <div>
                            <img src="./erweima.png" alt="">
                            iOS
                        </div>

                    </div>
                </li> -->
                <li class="window_li">
                    <img class="window" src="./window.png" alt="">
                    <img class="download" src="./download.png" alt="">
                    Windows
                    <div class="window_url_content">
                        点击立即下载

                    </div>
                </li>
                <li class="mac_li">
                    <img src="./mac.png" alt="">
                    Mac
                    <div class="mac_url_content">
                        <div class="Intel_div">
                            下载Intel芯片版
                        </div>
                        <!-- <div class="Applel_div">
                            下载Applel芯片版
                        </div> -->
                    </div>
                </li>
                <!-- <li class="tv_li">
                    <img class="tv" src="./tv.png" alt="">
                    <img class="download" src="./download.png" alt="">
                    Tv端
                    <div class="tv_url_content">
                        点击立即下载

                    </div>
                </li> -->

            </ul>
        </div>
    </div>

    <script src="./jq.js"></script>
    <script>
        $(function () {
            // 下载软件的链接地址
            let urlObj = {
                        
                window_li:"http://58.34.36.138:30000/pcclient/smartShare-1.0.5.exe",//这个是windows软件下载地址

                tv_li:'',
                Intel_div:"http://58.34.36.138:30000/pcclient/smartshare-1.0.5.dmg",//苹果intel芯片的软件下载地址
                Applel_div:"http://58.34.36.138:30000/pcclient/smartshare-1.0.5.dmg",//苹果Applel芯片的软件下载地址
            }
            function downloadFunction(url)  {
                if(!url) return
                var tagA = document.createElement('a');
                tagA.setAttribute('href', url);
                tagA.setAttribute('downoad', true);
                tagA.style.display = 'none'; // append 在 android 6 系统中有兼容性问题
                // eslint-disable-next-line unicorn/prefer-node-append

                document.body.appendChild(tagA);
                tagA.click();
                setTimeout(function () {
                    document.body.removeChild(tagA);
                }, 333);
            }

            const window_li = document.querySelector('.window_li');
            const tv_li = document.querySelector('.tv_li');
            const Intel_div = document.querySelector('.Intel_div');
            const Applel_div = document.querySelector('.Applel_div');
        
            window_li.addEventListener('click', function(){
                downloadFunction(urlObj['window_li'])
            });
            // tv_li.addEventListener('click', function(){
            //     downloadFunction(urlObj['tv_li'])
            // });
            Intel_div.addEventListener('click', function(){
                downloadFunction(urlObj['Intel_div'])
            });
            // Applel_div.addEventListener('click', function(){
            //     downloadFunction(urlObj['Applel_div'])
            // });
        })
    </script>
</body>

</html>